{% if slb_list %}
        <table class="table table-striped table-hover table-condensed table-responsive">
            <thead>
                <th class="text-right">ECS名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SLB状态&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;健康状态&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作&nbsp;&nbsp;&nbsp;</th>
                <th>健康状态</th>
                <th>实例ID</th>
                <th>实例别名</th>
                <th>实例状态</th>
                <th>实例IP</th>
                <th>IP地址类型</th>
                <th>网络类型</th>
                <th>创建时间</th>
                <th>站点列表</th>
            </thead>
            <tbody>
                {% for slb in slb_list %}
                <tr>
                    <td align="right" id="td_{{ slb.id }}">
                        {% for ecs in slb.slbhealthstatus_set.all %}
                            <p>
                                <span>{{ ecs.ECS }}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                                {% if ecs.SLBstatus == "added" %}<span class="text-info">已添加</span>{% else %}<span class="text-danger">已移除</span>{% endif %}&nbsp;&nbsp;&nbsp;&nbsp;
                                {% if ecs.SLBstatus == "added" %}
                                    {% if ecs.healthstatus == "normal" %}<span class="text-success">正常</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    {% elif ecs.healthstatus == "abnormal" %}<span class="text-danger">异常</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    {% else %}<span class="text-warning">正在检查</span>&nbsp;
                                    {% endif %}
                                {% else %}
                                    <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                {% endif %}
                                <span>
                                    {% if ecs.SLBstatus == "added" %}<a href="javascript:void(0);" id="removebackendserver{{ slb.id }}" onclick="RemoveBackendServer('{{ slb.id }}', '{{ slb.instanceid }}', '{{ ecs.ECS_id }}', '{{ ecs.ECS.name }}')" type="button" class="btn btn-sm btn-warning" >移除</a>{% endif %}
                                    {% if ecs.SLBstatus == "removed" %}<a href="javascript:void(0);" id="addbackendserver{{ slb.id }}" onclick="AddBackendServer('{{ slb.id }}', '{{ slb.instanceid }}', '{{ ecs.ECS_id }}', '{{ ecs.ECS.name }}')" type="button" class="btn btn-sm btn-success" >添加</a>{% endif %}
                                </span>
                             </p>
                        {% endfor %}
                    </td>
                    <td><a href="javascript:void(0);" id="healthrefresh{{ slb.id }}" onclick="HealthRefresh('{{ slb.id }}', '{{ slb.instanceid }}')" type="button" class="btn btn-sm btn-info" >刷新</a></td>
                    <td><a href="{% url 'configmanager:slbdetail' slb.id %}">{{ slb.instanceid }}</td>
                    <td>{{ slb.name }}</td>
                    <td>{{ slb.status }}</td>
                    <td>{{ slb.ip }}</td>
                    <td>{% if slb.addresstype == "internet" %}公网{% endif %}{% if slb.addresstype == "intranet" %}私网{% endif %}</td>
                    <td>{% if slb.networktype == "classic" %}经典网络{% endif %}{% if slb.networktype == "vpc" %}专有网络{% endif %}</td>
                    <td>{{ slb.createdate }}</td>
                    <td>
                        {% for site in slb.slbsite_set.all %}
                            <p>{{ site }}</p>
                        {% endfor %}
                    </td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p>No SLB are available.</p>
    {% endif %}